package com.shuke.medical.insure.controller;

import com.shuke.medical.insure.model.dto.*;
import com.shuke.medical.insure.model.vo.ChsOrderPayVO;
import com.shuke.medical.insure.model.vo.ChsPayDetailFeeVO;
import com.shuke.medical.insure.model.vo.ChsPayOrderSettleAccountsVO;
import com.shuke.medical.insure.model.vo.ChsRefundVO;
import com.shuke.medical.insure.service.ChsPayService;
import com.shuke.medical.insure.utils.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author woo hua
 * @date 2023-04-04 9:17
 */
@RestController
@RequestMapping("chsPay")
public class ChsPayController {

    @Resource
    private ChsPayService chsPayService;

    @PostMapping("/do6201")
    public R<ChsPayDetailFeeVO> do6201(@Validated @RequestBody ChsPayDetailUploadDTO dto) {
        return chsPayService.do6201(dto);
    }

    @PostMapping("/do6202")
    public R<ChsOrderPayVO> do6202(@Validated @RequestBody ChsOrderPayDTO dto) {
        return chsPayService.do6202(dto);
    }

    @PostMapping("/do6203")
    public R<ChsRefundVO> do6203(@Validated @RequestBody ChsRefundDTO dto) {
        return chsPayService.do6203(dto);
    }

    @PostMapping("/do6401")
    public R do6401(@Validated @RequestBody ChsPayDetaiQuashUploadDTO dto) {
        return chsPayService.do6401(dto);
    }

    @PostMapping("/do6301")
    public R<ChsPayOrderSettleAccountsVO> do6301(@RequestBody ChsPayOrderSettleAccountsDTO dto) {
        return chsPayService.do6301(dto);
    }
}
